package com.platform.car.service.impl;

import com.platform.car.dao.CarsDao;
import com.platform.car.model.Cars;
import com.platform.car.service.CarsService;
import com.platform.common.base.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Transactional
@Service
public class CarsServiceImpl extends BaseServiceImpl<Cars> implements CarsService {

    @Autowired
    private CarsDao carsDao;

    @Override
    public Long countNumber(Cars cars) {
        return carsDao.countNumber(cars);
    }

    @Override
    public Long countNumberPlates(Cars cars) {
        return carsDao.countNumberPlates(cars);
    }

    @Override
    public List<Cars> selectByUserId(Cars cars) {
        return carsDao.selectByUserId(cars);
    }

    @Override
    public Cars selectByPlates(Cars cars) {
        return carsDao.selectByPlates(cars);
    }

    @Override
    public Integer deleteByUserId(Integer userId) {
        return carsDao.deleteByUserId(userId);
    }
}
